package collection.map2.hashtable;

import java.util.Hashtable;
import java.util.Map;

import org.junit.Test;

public class HashTableDemo {
	Map<Object, Object> map = new Hashtable<Object, Object>();

	@Test
	public void testPut() {
		// 值不能为null
		map.put("A", "A");
		map.put("B", null);
		map.put("E", "E");
		System.out.println(map);
	}

	@Test
	public void testPut2() {
		// 键不能为null
		map.put("A", "A");
		map.put(null, "D");
		map.put("E", "E");
		System.out.println(map);
	}

}
